<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<meta name="decorator" content="sysDefault" />
<script type="text/javascript"
	src="${staticPath}/lib/jquery/1.10.2/jquery.js"></script>
<script type="text/javascript">
	$(function() {

	})

	function funform(url, target) {
		window.open(url, target);
	}
</script>
</head>
<body>
	<div class="container-fluid">
		<div class="row">
			<div class="col-xs-12">
				<div class="panel panel-default">
					<div class="panel-heading">
						<h3 class="panel-title">
							表单列表
							<button <c:if test="${typeId==0}">disabled="disabled" </c:if>
								class="btn btn-success btn-sm pull-right" role="button"
								onclick="funform('${contextPath}/sys/base/form/${typeId}/add','_self');">新增</button>
						</h3>

					</div>

					<form:form name="listForm" modelAttribute="sysBaseForm"
						action="${contextPath}/sys/base/form/${typeId}/list"
						class="navbar-form navbar-left" role="search" method="get">
						<div class="form-group">
							<form:input path="name" class="form-control" placeholder="名称" />
						</div>
						<button class="btn btn-primary" type="submit">查询</button>


						<tags:message content="${message}" />
						<table class="table table-striped table-bordered table-hover">
							<thead>
								<tr>
									<th>key</th>
									<th>名称</th>
									<th>url</th>
									<th>模块名称</th>
									<th>新建人</th>

									<%-- 
								<th>备用1</th>
								<th>备用2</th>
								<th>备用3</th>
								--%>
									<th>操作</th>
								</tr>
							</thead>
							<tbody>
								<c:forEach items="${page.list}" var="sysBaseForm">
									<tr>
										<td>${sysBaseForm.key}</td>
										<td>${sysBaseForm.name}</td>
										<td>${sysBaseForm.url}</td>
										<td>${sysBaseForm.moduleName}</td>
										<td>${sysBaseForm.createBy}</td>

										<td><a
											href="${contextPath}/sys/base/form/${sysBaseForm.id}/edit">修改</a>
											<a
											href="${contextPath}/sys/base/form/${sysBaseForm.id}/delete"
											onclick="return Oosp_Confirm('删除表单 -- ${sysBaseForm.name} -- ,确认删除？', this.href)">删除</a>
										</td>
									</tr>
								</c:forEach>
							</tbody>
						</table>
						<div class="panel-footer">
							<pager:pager pageSize="${page.pageSize}" pageNo="${page.pageNo}"
								url="" total="${page.total}" />
							<script type="text/javascript" src="${staticPath}/js/list.js"></script>
						</div>
					</form:form>
				</div>
			</div>
		</div>
	</div>
</body>
</html>